package com.tyut.service.impl;

import com.tyut.dao.StudentDao;
import com.tyut.service.StudentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service("studentService")
public class StudentServiceImpl implements StudentService {

    @Resource(name="studentDao")
    private StudentDao studentDao;

    @Override
    public void save() {
        this.studentDao.save();
        System.out.println("StudentService...save...");
    }

    @Override
    public void add(int id) {
        this.studentDao.addStudent(id);
        //System.out.println("StudentService...add...");
    }

    @Override
    public void delete(int id) {
        this.studentDao.deleteStudent(id);
        //System.out.println("StudentDao...delete...");
    }
}
